package com.forclass;

import java.lang.reflect.Method;

public class MyFileClassTest {
    public static void main(String[] args) throws Exception {
        MyFileClassloader fileClassloader = new MyFileClassloader();
        Class<?> claz = fileClassloader.loadData("com.forclass.Message");
        Object obj = claz.getDeclaredConstructor().newInstance();
        Method method = claz.getMethod("echo",String.class);
        System.out.println(method.invoke(obj,"Hello message"));
    }
}
